<template>
  <div id="newvideo">
    <van-icon name="arrow-left" class="topleft" @click="back"/>
    <h1>猫眼电影</h1>
    <van-icon name="bars" class="topright"/>
    <van-tabs v-model="active">
        <van-tab title="推荐"><NewVideo1></NewVideo1></van-tab>
        <van-tab title="预告片"><NewVideo2></NewVideo2></van-tab>
        <van-tab title="热片解读"><NewVideo3></NewVideo3></van-tab>
        <van-tab title="速看电影"><NewVideo4></NewVideo4></van-tab>
        <van-tab title="剧集综艺"><NewVideo5></NewVideo5></van-tab>
    </van-tabs>
  </div>
</template>

<script>
import NewVideo1 from "../components/NewVideo/NewVideo1.vue";
import NewVideo2 from "../components/NewVideo/NewVideo2.vue";
import NewVideo3 from "../components/NewVideo/NewVideo3.vue";
import NewVideo4 from "../components/NewVideo/NewVideo4.vue";
import NewVideo5 from "../components/NewVideo/NewVideo5.vue";
export default {
    name:'newvideo',
    components:{NewVideo1,NewVideo2,NewVideo3,NewVideo4,NewVideo5},
    created(){
        this.getlist()
    },
    data(){
        return {
            navId:4,
            active: 0,
            videolist:[]
        }
    },
    methods:{
        getlist(){
            this.axios
            .get(`video/${this.navId}`)
            .then(value=>{
                this.videolist=value.feeds
            })
        },
        back(){
            this.$router.go(-1);
        }, 
    },
}
</script>

<style scoped>
*{
    padding: 0;
    margin: 0;
}
h1{
    width: 100%;
    text-align: center;
    height: 50px;
    font-size: 20px;
    line-height: 50px;
    background-color: rgb(235, 56, 56);
    color: white;
    font-weight: 500;
}
.topleft{
    position: absolute;
    color: white;
    font-size: 30px;
    left: 0;
    top: 10px;
}
.topright{
    position: absolute;
    font-size: 30px;
    color: white;
    right: 0;
    top: 10px;
}
.van-tabs{
    margin-top:8px;
}
.video{
    width: 100%;
    height: 200px;
    margin: 10px 0;
    margin-top:20px;
    border-top: 2px solid rgb(3, 0, 0);
    border-bottom: 2px solid rgb(4, 0, 0);
}
.left{
        clear: both;
        float: left;
        width: 30%;
        height: 2rem;
        line-height: 2rem;
        padding: 0 10px;
        position: relative;
}
.left img{
        border-radius: 50%;
        width: 30px;
        margin-left: -5px;
        border:1px solid white
}
.text{
    position: absolute;
}
.right{
    width: 50%;
    float: right;
    height: 2rem;
    line-height: 2rem;
}
.van-icon{
    font-size: 2rem;
}
</style>